package me.security.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

import me.security.bean.User;

public class Test {
	public static void main(String[] args) {
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
	System.out.println(ac.getBean("jdbcTemplate"));
	JdbcTemplate jt = (JdbcTemplate) ac.getBean("jdbcTemplate");
	User user = new User();
	String sql = "insert into user_info(userid,username)values('2','zhang')";
	jt.execute(sql);
	}
	
}
